﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace DataAccessService
{
  [ServiceContract]
  public interface IDataHelper
  {
    [OperationContract]
    List<Causes> GetTopCauses(string year, string country);

    [OperationContract]
    int GetMaxValue(string country);

    [OperationContract]
    List<int> GetDataPoints(string country);

    [OperationContract]
    List<Int32> GetTopCausesMaleStats(string year, string country, List<Causes> causesOfDeath);

    [OperationContract]
    List<Int32> GetTopCausesFemaleStats(string year, string country, List<Causes> causes);

    [OperationContract]
    int GetMvFMaxValue(string country);

    [OperationContract]
    List<CauseProgression> GetCauseProgression(string country, string cause);

    [OperationContract]
    Int32 GetMaxValueForCause(string country, string cause);

    [OperationContract]
    List<CountPerCountry> GetCountsPerCountry(string cause, string year, string country);

    [OperationContract]
    double GetCountsForCountry(string country, string cause, string year);
  }

  [DataContract]
  public class Causes
  {
    [DataMember]
    public string Cause
    { get; set; }
    
    [DataMember]
    public Int32 Count
    { get; set; }
  }

  public class CauseProgression
  {
    [DataMember]
    public string Year
    { get; set; }
    
    [DataMember]
    public Int32 Count
    { get; set; }
  }

  public class CountPerCountry
  {
    [DataMember]
    public string Country
    { get; set;}

    public string Count
    {get; set;}
  }
}
